package com.zjitc.model;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/5/14 16:42
 * @description:
 */
public class Cart {

  private String cartid; //主键UUID
  private int quantity;  //当前条目数量
  private int orderby;   //用于排序
  private int pid;
  private int uid;
  private Product product;
  private User user;

  public Cart() {
  }

  public Cart(String cartid, int quantity, int orderby, Product product, User user) {
    this.cartid = cartid;
    this.quantity = quantity;
    this.orderby = orderby;
    this.product = product;
    this.user = user;
  }

  public String getCartid() {
    return cartid;
  }

  public void setCartid(String cartid) {
    this.cartid = cartid;
  }

  public int getQuantity() {
    return quantity;
  }

  public void setQuantity(int quantity) {
    this.quantity = quantity;
  }

  public int getOrderby() {
    return orderby;
  }

  public void setOrderby(int orderby) {
    this.orderby = orderby;
  }

  public Product getProduct() {
    return product;
  }

  public void setProduct(Product product) {
    this.product = product;
  }

  public User getUser() {
    return user;
  }

  public void setUser(User user) {
    this.user = user;
  }

  public int getPid() {
    return pid;
  }

  public void setPid(int pid) {
    this.pid = pid;
  }

  public int getUid() {
    return uid;
  }

  public void setUid(int uid) {
    this.uid = uid;
  }

  @Override
  public String toString() {
    return "Cart{" +
        "cartid='" + cartid + '\'' +
        ", quantity=" + quantity +
        ", orderby=" + orderby +
        ", pid=" + pid +
        ", uid=" + uid +
        ", product=" + product +
        ", user=" + user +
        '}';
  }
}
